#pragma once

#include "Command.h"

namespace Base { namespace Env {
    class Environment;
}}

namespace Base { namespace CmdFwk {

    class CmdMgr;

    // InteractiveCmd can be active and recieve some events(such as MouseEvent, 
    // KeyEvent, and etc.). 

    class InteractiveCmd : public Command
    {
        friend class CmdMgr;
    
    protected:
        InteractiveCmd(const void* id);
        virtual ~InteractiveCmd();
        
    public:
        // Inherit from Command.
        virtual bool isInteractiveCmd() const;

        enum EState
        {
            eNormal     = 0,
            eActive,

            // === Bottom ===
            eNumStates
        };

        EState state() const;
        void state(EState);
    
    protected:
        virtual void onActivate();
        virtual void onDeactivate();

    private:
        EState  m_state;
    };

}}